@extends('admin.master')

@section('top')
	<div class="top-breadcrumb pull-left">{!! Breadcrumbs::render('admin.lan-complete.index', $order->type) !!}</div>
	@if (auth()->user()->can('lan-create'))
	<div class="top-btn-group pull-right">
		<a href="{{ route('admin.lan-complete.create', ['order_id'=>$orderId]) }}" class="btn btn-primary">添加语言版本</a>
	</div>
	@endif
@endsection

@section('content')
<div class="gridSection">
{!! Form::open(['url'=>'admin/lan-complete']) !!}
	<table class="table table-hover table-list">
		<thead>
			<tr>
				<th class="text-center" width="60">序号</th>
				<th>语言版本</th>
				<th>完成进度</th>
				<th>备注</th>
				<th class="text-right">操作</th>
			</tr>
		</thead>
		<tbody>
			@foreach ($data as $value)
				<tr>
					<td class="text-center">{{ $i++ }}</td>
					<td>{{ $lans[$value->language] }}</td>
					<td>
		        		<div class="progress-list">
		        			<input type="hidden" class="sub-progress" value="{{ $value->progress }}">
			        		@foreach(config('system.lan_progress') as $key=>$progress)
			        			<a href="{{ url('admin/lan/progress-update/'.$value->id.'-'.$key) }}" class="c-tag {{ ($key <= $value->progress) ? 'c-tag-green' : '' }}" data-progress="{{ $key }}">
				        			<span class="c-tag-text">{{ $progress }}</span>
			        			</a>
			        		@endforeach
		        		</div>
					</td>
					<td>{{ $value->remark }}</td>
					<td class="text-right">
						<div class="toolbar">
							<a href="{{ route('admin.lan-complete.edit', $value->id) }}" class="btn-link">修改</a>
							@if (auth()->user()->can('lan-delete'))
							<span class="text-explode ">|</span>
							<a href="javascript:void(0);" data-id="{{ $value->id }}" class="btn-link delete-item">删除</a>
							@endif
						</div>
					</td>
				</tr>
			@endforeach
		</tbody>
	</table>
	@if ($data->isEmpty())
	<div class="simple-none-data text-center">
		<i class="fa fa-exclamation-circle text-size-20 text-muted" style="vertical-align: middle"></i> 
		<span class="text-size-14 inline-block ml5">没有查询到符合条件的记录</span>
	</div>
	@endif
{!! Form::close() !!}
</div>
@endsection

@section('foot')
<script type="text/javascript">
	
</script>
@endsection